<?php

class Admin_Form_Event_PlaceAdd extends My_FormAdmin {

    public function init() {
        $this->setMethod('post');
        $this->setAction($this->getView()->url(array('controller' => 'event', 'action' => 'place-save'), 'admin', true));

        $this->setTitle($this->translate('XXX_ADMIN_EVENT_PLACE_ADD_FORM_TITLE'));
        
        $type = new Zend_Form_Element_Select('type');
        $type->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_TYPE_LABEL'));
        $type->setRequired();
        $options = array(
            '' => '',
        );
        foreach (My_Utils::getEventPlacesTypes() as $key => $val) {
            $options[$key] = $val;
        }
        $type->setMultiOptions($options);
        $this->addElement($type);
        
        $name = new Zend_Form_Element_Text('name');
        $name->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_NAME_LABEL'));
        $name->setRequired();
        $this->addElement($name);
        
        $address = new Zend_Form_Element_Text('address');
        $address->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_ADDRESS_LABEL'));
        $this->addElement($address);
        
        $city = new Zend_Form_Element_Text('city');
        $city->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_CITY_LABEL'));
        $this->addElement($city);
        
        $desc = new My_Form_Element_Wyswig('description');
        $desc->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_DESCRIPTION_LABEL'));
        $this->addElement($desc);

        $img = new My_Form_Element_ImageUpload('image_id');
        $img->setLabel(_('XXX_ADMIN_EVENT_PLACE_FORM_IMAGE_LABEL'));
        $this->addElement($img);
        
        $this->addSubmitElement();

    }

}

